package cn.bdqn.witcity.service;

import cn.bdqn.witcity.entity.Product;
import cn.bdqn.witcity.mapper.ProductMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductServiceImpl implements ProductService{
    @Resource
    ProductMapper productMapper;
    @Override
    public List<Product> getAllProduct() {
        return productMapper.getAllProduct();
    }

    @Override
    public Product findProductById(Integer id) {
        return productMapper.findProductById(id);
    }

    @Override
    public int updateStock(Product product) {
        return productMapper.updateStock(product);
    }

    @Override
    public int addProduct(Product product) {
        return productMapper.addProduct(product);
    }
}
